package com.shengchao.examstar.rpc.question.api;


import com.shengchao.examstar.rpc.question.req.DoQuestionReq;
import com.shengchao.examstar.rpc.question.resp.QuestionInfoResp;
import com.shengchao.examstar.rpc.question.resp.QuestionListResp;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface IQuestionRpc {

    /**
     * 查询题集下的所有题目
     */
    List<QuestionListResp> getQuestionListByQuestionSetId(String questionSetId) throws ExecutionException, InterruptedException;

    /**
     * 查询题目详情
     */
    QuestionInfoResp getQuestionInfo(Long questionId, Long questionSetId) throws ExecutionException, InterruptedException;

    /**
     * 做题
     */
    void doQuestion(List<DoQuestionReq> doQuestionReqs);

    /**
     * 批改
     */
    void correct(DoQuestionReq doQuestionReq, Long uid, String comment, Double score);

    /**
     * 加入错题本
     */
    void addToWrongBook(Long questionId, Long userId, Long questionSetId, String extS);

    /**
     * 重新做题
     */
    void clearQuestionSetRecord(Long questionSetId);
}
